package be.bonamis.umpire.ui.client;

import javax.inject.Inject;

import be.bonamis.umpire.ui.client.mvp.LoginView;
import be.credoc.common.gwt.actions.client.ActionServiceWrapper;

import com.google.gwt.place.shared.PlaceController;
import com.google.gwt.place.shared.PlaceHistoryHandler;
import com.google.inject.Provider;
import com.google.web.bindery.event.shared.EventBus;

public class ClientFactory {

	private Provider<PlaceController> placeController;

	private Provider<PlaceHistoryHandler> placeHistoryHandler;

	private Provider<ActionServiceWrapper> actionServiceWrapper;

	private Provider<EventBus> eventBus;

	private Provider<LoginView> loginView;

	private Messages messages;

	public ClientFactory() {
	}

	@Inject
	public ClientFactory(Provider<PlaceController> placeController, Provider<PlaceHistoryHandler> placeHistoryHandler,
			Provider<ActionServiceWrapper> actionServiceWrapper, Provider<EventBus> eventBus,			
			Provider<LoginView> loginView, Messages messages) {

		this.placeController = placeController;
		this.placeHistoryHandler = placeHistoryHandler;
		this.actionServiceWrapper = actionServiceWrapper;
		this.eventBus = eventBus;		
		this.loginView = loginView;
		this.messages = messages;
	}

	public PlaceController getPlaceController() {
		return placeController.get();
	}

	public PlaceHistoryHandler getPlaceHistoryHandler() {
		return placeHistoryHandler.get();
	}

	public ActionServiceWrapper getActionServiceWrapper() {
		return actionServiceWrapper.get();
	}

	public EventBus getEventBus() {
		return eventBus.get();
	}

	public Messages getMessages() {
		return messages;
	}

	public LoginView getLoginView() {
		return loginView.get();
	}


}
